using System;
using Slobby.Common;
using Slobby.SharedNetworkTypes;

namespace Slobby.Client {
    class ClientReciever : Reciever {

        public void Recieve(RecieveChatMessage chat) {
            Program.chatRecieved(chat.UserName, chat.Message);
        }

        public void Recieve(JoinGameMessage join) {
            Games.SupremeCommander.Join(Program.username, System.Net.IPAddress.Parse(join.Address));
        }

        public override void Default(object o) {
            
        }
    }
}
